package com.mathdroid.gui.componentlist;

/**
 * Extend this to create an list model element.
 */
public abstract class AComponentListElement {
	
	/**
	 * Each element gets an index from the list model. This index is used by
	 * the view to identify cells.
	 */
	private int index = 0;
	
	/**
	 * Get the index in the list.
	 * @return Index in list.
	 */
	public final int getIndex() {
		return this.index;
	}
	
	/**
	 * Set the index in the list.
	 * @param i Index in the list.
	 */
	public final void setIndex(final int i) {
		this.index = i;
	}
}
